<?php
namespace backend\controllers;

use Yii;
use yii\web\Controller;


/**
 * Site controller
 */
class SiteController extends Controller
{
    public $enableCsrfValidation = false;

    //系统设置
    public function actionSetup()
    {
        print_r(2222222222);die();
        $post = Yii::$app->request->post();
        if(!empty($post)){
            $update=Yii::$app->db->createCommand('UPDATE bf_config set pt_interest='.$post['pt_interest'].',user_interest='.$post['user_interest'].',update_time='.time().' WHERE id=1')->execute();
            return json_encode(['code' => 200, 'message' => '修改成功！', 'data' => $update]);
        }else{
            return json_encode(['code' => 401, 'message' => '绑定失败！', 'data' => '']);
        }
    }
}
